From 21e3e1a41cf9c2442b14a3ba670f7b5005aaebfb Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 14 Apr 2006 22:44:11 +0000 Subject: [PATCH] Geoniche improvements from Pasha Phares. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1894 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/geoniche.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gpsbabel/geoniche.c b/gpsbabel/geoniche.c index 385512cce..8e659d2e2 100644 --- a/gpsbabel/geoniche.c +++ b/gpsbabel/geoniche.c @@ -601,20 +601,20 @@ wpt2icon(const waypoint *wpt) static char * geoniche_geostuff(const waypoint *wpt) { - char *gs = NULL, *tmp1, *tmp2; + char *gs = NULL, *tmp1, *tmp2, *tmp3; char tbuf[10240]; if (!wpt->gc_data.terr) { return NULL; } - snprintf(tbuf, sizeof(tbuf), "\n%s by %s\n", gs_get_cachetype(wpt->gc_data.type), wpt->gc_data.placer); + snprintf(tbuf, sizeof(tbuf), "\n%s by %s\n\n", gs_get_cachetype(wpt->gc_data.type), wpt->gc_data.placer); gs = xstrappend(gs, tbuf); snprintf(tbuf, sizeof(tbuf), "Waypoint: %s %s\n", wpt->shortname, wpt->description); gs = xstrappend(gs, tbuf); - snprintf(tbuf, sizeof(tbuf), "Difficulty %3.1f, Terrain: %3.1f\n", wpt->gc_data.diff/10.0, wpt->gc_data.terr/10.0); + snprintf(tbuf, sizeof(tbuf), "Difficulty %3.1f\nTerrain: %3.1f\n\n", wpt->gc_data.diff/10.0, wpt->gc_data.terr/10.0); gs = xstrappend(gs, tbuf); tmp1 = strip_html(&wpt->gc_data.desc_short); @@ -622,8 +622,13 @@ geoniche_geostuff(const waypoint *wpt) gs = xstrappend(gs, tmp1); gs = xstrappend(gs, tmp2); + tmp3 = rot13(wpt->gc_data.hint); + snprintf(tbuf, sizeof(tbuf), "\n\nHint: %s\n", tmp3); + gs = xstrappend(gs, tbuf); + xfree(tmp1); xfree(tmp2); + xfree(tmp3); return enscape(gs); } -- 2.30.2